package com.question.service;

import java.util.List;

import com.question.entity.Answer;
import com.question.entity.Question;
import com.question.entity.User;

public interface IPlayerService {
	/**
	 * 按类型列出所有的问题
	 * @param question
	 * @return
	 */
	List<Question> questionList(Question question);
	/**
	 * 通过问题的id查询Question
	 * @param id
	 * @return
	 */
	Question getQuestionById(Integer id);
	/**
	 * 回答的问题
	 * @param answer
	 */
	void answerQuestion(Answer answer);
	/**
	 * 回答的问题
	 * @param question
	 */
	void askQuestion(Question question);
	/**
	 * 通过user查询Question
	 * @param player
	 * @return
	 */
	List<Question> findQuestionByUser(User player);
	
	List<Answer> findAnswerByQuestionID(Integer inVal);

	List<Answer> isaccepted(User player, Integer qId);

	void acceptAnswer(Integer id, Integer qId);

	User updatePlayer(User player);

	List<User> rankUserByScoreTop10();
	Question findQuestionInfoById(Integer id);


}
